/**
Company: Sarkar software technologys
WebSite: http://www.sarkar.cn
Author: yeganaaa
Date : 5/16/18
Time: 11:13 AM
 */

package Cn.Sarkar.IMS.Entities

import Cn.Sarkar.Entities.Common.Additional.IName
import Cn.Sarkar.Entities.IMS.IIMSApplicationDomain
import Cn.Sarkar.Entities.IMS.IPriceItem
import Cn.Sarkar.Entities.IMS.IPriceTable
import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.Core.Extensions.hasOne
import Cn.Sarkar.EntityDream.CoreEngine.RDBMS.IDataContext
import Cn.Sarkar.IMS.DataBaseDefinations.PriceTables
import Cn.Sarkar.Entities.Common.BaseEntity
import java.util.*

class PriceTable(DataContext: IDataContext) : IPriceTable, BaseEntity(DataContext, PriceTables) {
    var applicationDomainID by PriceTables.ApplicationDomainID
    override var applicationDomain: IIMSApplicationDomain by hasOne(PriceTables.ApplicationDomainID) { IMSApplicationDomain(it) }
    var nameID by PriceTables.NameID
    override var name: IName by hasOne(PriceTables.NameID) { Name(it) }
    override val prices: Collection<IPriceItem> = LinkedList()
    override var state: Int by PriceTables.State

}